package com.neusoft.bizcore.webauth.secret;

import java.util.Arrays;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "bizcore.webauth", ignoreUnknownFields = false)
public class BizcoreWebAuthProperties {

    private long jwtExpiration = 86400000;
    private String jwtSigningKey = "secret";

    private String usernameParameter = "username";
    private String passwordParameter = "password";
    private String loginProcessingUrl = "/login";
    private String logoutProcessingUrl = "/logout";
    private List<String> permitAll = Arrays.asList("/", "/login", "/websocket/**");

    private List<String> ignores =
            Arrays.asList("/favicon.ico", "/static/**", "/css/**", "/js/**", "/assets/**", "/fonts/**");
    private String authServiceName = "auth";
}
